<?php
/*
 *  Project lonely
 *  Author: Fvcity dev Team
 *  File: /lonely/comments.php
 *
 *  Subversion Keywords:
 *  $Id: comments.php 19 2007-07-05 05:21:52Z fvcity.roy $
 *  $Date: 2007-07-05 05:21:52 +0000 (Thu, 05 Jul 2007) $
 *  $Revision: 19 $
 *  $Author: fvcity.roy $
 *  $URL: http://fvcity.googlecode.com/svn/trunk/comments.php $
 */
 ?>
 
<ul class="postnote">
<?php if ( pings_open() ) : ?><li class="trackback">
<a href="<?php trackback_url() ?>" rel="trackback"><?php _e('Trackback <abbr title="Uniform Resource Identifier">URI</abbr>'); ?></a></li>
<?php endif; ?>
<li class="comments_rss"><?php comments_rss_link(__('<abbr title="Really Simple Syndication">RSS</abbr> Feed for Comments')); ?></li>
</ul>
<br />
<br />

<div class="comments">
<div class="list">
<!-- Start CommentsList-->
<?php // Do not delete these lines
	if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
		die ('Please do not load this page directly. Thanks!');

	if (!empty($post->post_password)) { // if there's a password
		if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) {  // and it doesn't match the cookie
			?>

			<p class="nocomments">This post is password protected. Enter the password to view comments.<p>

			<?php
			return;
		}
	}

?>

<?php if ($comments) : ?>
<h3 id="comments"><span class="hetor"><?php comments_only_number('No Comments', 'One Comments', '% Comments' );?> so far</span></h3>
<ol>
<?php foreach ($comments as $comment) : ?>
<?php if (get_comment_type() == 'comment') : ?>

 <li id="comment-<?php comment_ID() ?>">

<div class="gravatar">
 	  	 <?php if (function_exists('gravatar')) : ?>
 	  	 	  
 	  	 	<a href="#" title="What is this?"><img src="<?php gravatar("X", 42, get_bloginfo('template_url')."/images/40_feet.png", ""); ?>" class="gravatar" alt="Gravatar Icon" /></a>
 	  	 	  
 	    <?php else : ?>
 	    	<a href="#" title="What is this?"><img src="<?php bloginfo('template_url'); ?>/images/defaultgravatar.jpg" alt="Fvcity Icon" /></a>
        <?php endif; ?>
        </div><div class="commentauthor <?php comment_class(); ?>">
        	
<div class="listuser"><?php comment_author_link() ?> <span class="listdate"><a href="#comment-<?php comment_ID() ?>" title=""><?php comment_time ('Y年n月j日 g:i a') ?></a> <?php edit_comment_link('<span class="list_edit">编辑留言</span>'); ?></span></div>
 

 <div class="listcontent">
 <?php comment_text() ?>

 <?php if ($comment->comment_approved == '0') : ?>
    您已经成功提交了留言,请等待管理员审核,谢谢!
 </div>
 </div>	 
 
 <?php endif; ?>  
  </div>
</li>
<?php endif; ?>
<?php endforeach; /* end for each comment */ ?>
</ol>
	
	
<?php if ($trackbacks = trackpings()) : ?>
<h3 id="trackpings"><span class="hetor"><?php echo trackpings('count'); ?> Trackbacks/Pingbacks</span></h3>
<ul class="trackpings"><?php listtrackpings('trackback', '<li id="trackback-%id"><span><a href="%url" title="%origin">%origin</a> (Trackback, %date)</span><br />%content</li>'); ?>
	                   <?php listtrackpings('pingback', '<li id="trackback-%id"><span><a href="%url" title="%origin">%origin</a> (Pingback, %date)</span><br />%content</li>'); ?></ul>
<?php endif; ?>

<?php else : // this is displayed if there are no comments so far ?>
<?php if ('open' == $post->comment_status) : ?> 
<!-- If comments are open, but there are no comments. -->
<?php else : // comments are closed ?>
<!-- If comments are closed. -->
<p class="nocomments">Comments are closed.</p>
<?php endif; ?>
<?php endif; ?>
<?php if ('open' == $post->comment_status) : ?><br />
<!-- Ends CommentsList-->
</div></div>


<!-- Start Comments Form-->
<div class="form">
<h3 id="respond"><span class="hetor">Leave a reply</span></h3> 

<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
<p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php the_permalink(); ?>">logged in</a> to post a comment.</p>
<?php else : ?>

<div class="formtop"></div><form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
<?php if ( $user_ID ) : ?>
<p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="<?php _e('Log out of this account') ?>">Logout &raquo;</a></p>
<?php else : ?>

<p><label for="author"><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" class="text" /> <small>Name <?php if ($req) _e('(required)'); ?></small></label></p>
		
<p><label for="email"><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" class="text" /> <small>E-mail (必须)</small></label></p>
		
<p><label for="url"><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" class="text" /> <small><abbr title="Uniform Resource Identifier">Web Site</abbr> (可选)</small></label></p>
	

<?php endif; ?>
<p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4" class="textarea"></textarea></p>

<p>
<input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" />
<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
</p>
<?php do_action('comment_form', $post->ID); ?>
</form>
<?php endif; // If registration required and not logged in ?>
<?php endif; // if you delete this the sky will fall on your head ?>
</div>